package com.xframe.xdal.core.convert;

import com.xframe.xdal.core.constant.DataSourceTypeEnums;
import com.xframe.xdal.core.convert.factory.DBTypeStrategyFactory;

public class MysqlDBHelper implements IDBTypeStrategy {

    public IDBTypeStrategy getDBTypeStrategy() {
        IDBTypeStrategy idbTypeStrategy = DBTypeStrategyFactory.create(DataSourceTypeEnums.MySql);
        return idbTypeStrategy;
    }


    /**
     * 将Java类型转为对应的DB类型（含声明的长度信息，如：varchar(10)）
     *
     * @param dbConvertInfo
     * @return
     */
    @Override
    public String getDbType(DBConvertInfo dbConvertInfo) {
        return this.getDBTypeStrategy().getDbType(dbConvertInfo);
    }
}

